﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhaoxi.AdvancedCourse.GenericClasses;

namespace Zhaoxi.AdvancedCourse.Models
{
    public class IncomeInfo : RecordBase, IRecord
    {
        public int ItemId {  get; set; }
        public IncomeInfo() { 
        
        }
        public IncomeInfo(int id)
        {
            Id= id;
        }
        public IncomeInfo(int id,decimal amount)
        {
            Id = id;
            Amount= amount;
        }
        public IncomeInfo(int id,string remark,decimal amount)
        {
            Id = id;
            Remark= remark;
            Amount= amount;
        }
        public decimal CalTotalAmount(decimal amount)
        {
            return GenericMethodClass.totalAmount += amount;
        }

        public string GetIncomeInfo()
        {
            return "编号："+Id+", 描述："+Remark+", 金额："+Amount;
        }
    }
}
